package com.tledu.studentmanager.service.impl;

import com.tledu.studentmanager.domain.Student;
import com.tledu.studentmanager.mapper.StudentMapper;
import com.tledu.studentmanager.service.IStudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

/**
 * @author cyrus
 */
@Service
public class StudentServiceImpl implements IStudentService {

    @Autowired
    private StudentMapper mapper;

    @Override
    public int insert(Student record) {
        return mapper.insert(record);
    }

    @Override
    public int delete(int id) {
        return mapper.delete(id);
    }

    @Override
    public int update(Student record) {
        return mapper.update(record);
    }

    @Override
    public List<Student> selectList(String name, String school) {
        return mapper.selectList(name,school);
    }

    @Override
    public Student selectOne(int id) {
        return mapper.selectOne(id);
    }
}
